Rollup of 3 pull requests - #162527
Closed
Zalathar wants to merge 40 commits into
Closed
Conversation
so that we can specify more than one i32 of padding.
Remove LD_STATIC_TLS_EXTRA workaround from FreeBSD CI
make `pad_i32` of `PassMode::cast` an integer
so that we can specify more than one i32 of padding. This PR only adds the functionality but does not yet use it: there should be no functional changes.
This is needed for the ABI of `Complex<{ float }>` on 32-bit powerpc. Other mechanisms, e.g. using `PassMode::prefixed` don't appear to work.
More discussion is in [#t-compiler/help > power complex abi](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/power.20complex.20abi/with/613294420).
Co-Authored-By: Mads Marquart <mads@marquart.dk>
* Implement Reborrow as a recursive operation If Reborrow finds '&'a mut T' fields then it inserts a Deref and borrow of the T, and likewise if it finds a 'T: Reborrow' field then the field type is recursed into. This makes Reborrow always produce the correct borrow checking logic at the cost of most probably being inconsiderately expensive. The thinking is that performance will be a followup consideration. * PhantomDeref * Simpler deref test * Add more PhantomDeref unreachability assertions * Write out lifetime omission * Document ProjectionElem::PhantomDeref * Comment half of reborrow tests * fix PhantomDeref conflicting with AccessDepth::Shallow * Recheck CoerceShared in borrowck TypeChecker to ensure its lifetimes make sense * Fix rebase * Changes... but where to? * Typo fix * Improve comment * Use fully_perform_op to evaluate CoerceShared trait in borrowck * More CoerceShared comment * Comment rest of Reborrow tests Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
…ce, r=oli-obk fix(reborrow): recursive implementation If Reborrow finds '&'a mut T' fields where 'a is the Reborrowed type's first lifetime parameter (currently the only lifetime that is allowed to reborrow) then it inserts a Deref and borrow of the T, and likewise if it finds a 'T: Reborrow' field then the field type is recursed into. This makes Reborrow always produce the correct borrow checking logic at the cost of most probably being inconsiderately expensive. The thinking is that performance will be a followup consideration. r? @oli-obk
I added this flag back in 2017 to enable benchmarking of the saturating semantics when it was newly implemented and still experimental. But saturation has been the official semantics for float<->int `as` casts for years now. A flag for turning it off no longer serves any purpose, it's just `-Zplease-miscompile-casts` now.
…eature, r=Amanieu support `#[target_feature(enable = ...)]` on `#[naked]` functions fixes rust-lang#136280 Instructions that are part of a target feature require a special directive on some targets. This PR adds those for the most common targets. This is very WIP, but I'm hoping to collect some feedback on what is (not) supported and how to report that to users. r? @ghost cc @taiki-e @Amanieu
…ncs, r=folkertdev Make sin, cos, exp, exp2, log, log2, log10 generic Rebased and smaller version of rust-lang#153934 Following `fabs`, make the `sin`, `cos`, `exp`, `exp2`, `log`, `log2` and `log10` intrinsics generic over the float type, rather than having four variants per float type. The first two commits are purely stylistic: - reorganised Cranelift code to make following changes simpler - moved a misplaced comment in `compiler/rustc_codegen_llvm/src/intrinsic.rs` that caused `x fmt` to give up The last commit actually makes them generic! Most code is a bit simpler, ~~and this will also hopefully simplify adding support for these intrinsics for the future [`bf16` type](rust-lang#160859 :) Unfortunately both GCC and Cranelift backend changes are a bit churny. Their code is a bit, opaque, to put it kindly, and I didn't want to refactor those here. r? @folkertdev cc @RalfJung
…RalfJung Remove -Zsaturating-float-casts flag I added this flag back in 2017 (rust-lang#45205) to enable benchmarking of the saturating semantics when it was newly implemented and still experimental. But saturation has been the official semantics for float<->int `as` casts for years now. A flag for turning it off no longer serves any purpose, it's just `-Zplease-miscompile-casts` now.
Facilitates scalable vector support in inline assembly.
…O is enabled The parallel frontend makes the cookies nondeterministic in their current form, resulting in nondeterministic outputs when bitcode is emitted or LTO is used. Causes minor diagnostic regression for inline asm in release builds.
…s, r=petrochenkov Restrict LLVM inline asm location cookie usage. Fixes rust-lang#150451 The parallel frontend makes the cookies nondeterministic in their current form, resulting in nondeterministic outputs when bitcode is emitted or LTO is used. Causes minor diagnostic regression for inline asm in release builds. See rust-lang#150451 for details. Fixes rust-lang#150451 r? bjorn3
We have `DiagCtxt`, `DiagCtxtInner`, and `DiagCtxtHandle`. They're all necessary, but the method placement is inconsistent. This commit establishes a clearer rule: methods should *not* go on `DiagCtxt` whenever possible. Benefits: - Simpler rule for deciding where to put a method. - `impl Deref for DiagCtxtHandle` can be removed, including its non-standard double-reference `&&'a DiagCtxt` return value. This makes it impossible to accidentally discard a taint target by calling `handle` on a `DiagCtxtHandle`. - Catches some places where we were calling `dcx.handle()` when `dcx` was already a handle.
This makes their test environment consistent between runs inside the cg_clif and rust repos.
miri: enforce proper types for c-variadic arguments in shims This adds proper type checks for c-variadic argument handling in Miri shims. So far we would have ICEd for many type mismatches since the innards of the interpreter generally assume that things are well-typed. The checks we are using are the same as for [`next_arg`](https://doc.rust-lang.org/nightly/std/ffi/struct.VaList.html#method.next_arg). This uncovered some interesting points: - We should accept `&mut` as equivalent to `*mut`. We don't allow `&mut` as a type in `next_arg` but we do allow it for c-variadic calls, so this change also affects a bit more code in const-eval (if the caller passes an `&mut` and the callee expects a `*mut`). Even CFI is okay with treating `&mut` and `*mut` as equivalent so this should be fine. Cc @folkertdev - Some places in the standard library futex handling used types for their variadic arguments that are not quite correct according to these rules. I fixed those. Cc @m-ou-se - One variadic function takes pointers to `libc::timespec`. A program with a libc dependency has two copies of libc (one in the sysroot, and the normal dependency). When Miri looks up the expected argument type, it picks one of them, leading to Miri seeing a type mismatch when there is a call using the other copy. C generally considers two copies of the same type to be identical, so I implemented logic that does the same: two `repr(C)` types are "identical" if the names of the types, and the names and types of all fields, are identical. I then also used that logic for the normal ABI checks, where it will also help since we had similar trouble there in the past (that we had to find other work-arounds for).
…r=oli-obk Minimize `DiagCtxt` methods We have `DiagCtxt`, `DiagCtxtInner`, and `DiagCtxtHandle`. They're all necessary, but the method placement is inconsistent. This commit establishes a clearer rule: methods should *not* go on `DiagCtxt` whenever possible. Benefits: - Simpler rule for deciding where to put a method. - `impl Deref for DiagCtxtHandle` can be removed, including its non-standard double-reference `&&'a DiagCtxt` return value. This makes it impossible to accidentally discard a taint target by calling `handle` on a `DiagCtxtHandle`. - Catches some places where we were calling `dcx.handle()` when `dcx` was already a handle. r? @oli-obk
Member
Author
|
Rollup of everything. @bors r+ rollup=never p=5 |
Contributor
Member
|
Making the rollup bigger |
Contributor
|
This pull request was unapproved due to being closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
DiagCtxtmethods #162453 (MinimizeDiagCtxtmethods)r? @ghost
Create a similar rollup